<ion-header-bar align-title="center" class="bar bar-header bar-light"
                style='background: url(img/icon/headerline.png); background-size: contain; background-position: bottom; background-repeat: no-repeat;'>
    <a class="button icon-left ion-ios-arrow-left button-clear button-light" ng-click="backGo()"></a>

    <h1 class="title">我的会议</h1>
</ion-header-bar>

<!--<div class="tabs-striped tabs-top tabs-light tabs-icon-top">-->
<!--<div class="tabs" ng-show="!edit" style="background-color:#F6F6F6">-->
<!--<a ng-class="{waitJoin: 'tab-item active', alreadyJoin: 'tab-item'}[isActive]" data-active="waitJoin"-->
<!--ng-click="changeTab($event)" style="font-size:16px;line-height:48px;">待我参加</a>-->
<!--<a ng-class="{waitJoin: 'tab-item', alreadyJoin: 'tab-item active'}[isActive]" data-active="alreadyJoin"-->
<!--ng-click="changeTab($event)" style="font-size:16px;line-height:48px;">我已参加</a>-->
<!--</div>-->
<!--</div>-->


<div class="tabs-striped tabs-top tabs-light" ng-show="!edit">
    <div class="tabs">
        <a ng-class="{waitJoin: 'tab-item active', alreadyJoin: 'tab-item', myMeet: 'tab-item'}[isActive]" href="#"
           ng-click="changeTab('waitJoin')">
            待我参加
        </a>
        <a ng-class="{waitJoin: 'tab-item', alreadyJoin: 'tab-item active', myMeet: 'tab-item'}[isActive]" href="#"
           ng-click="changeTab('alreadyJoin')">
            我已参加
        </a>
        <a ng-class="{waitJoin: 'tab-item', alreadyJoin: 'tab-item', myMeet: 'tab-item active'}[isActive]" href="#"
           ng-click="changeTab('myMeet')">
            我的会议
        </a>
    </div>
</div>
<ion-content ng-class="{'has-subheader':!edit}" class="bg">

    <div>
        <ion-refresher pulling-text="<span class='pulling-text-auto'>{{pulltextchange}}</span>" on-refresh="doRefresh()"
                       on-pulling="pulltext()" spinner="ripple" pulling-icon="ion-ios-refresh-empty"></ion-refresher>

        <ion-list ng-show="!edit">
            <ion-item ng-repeat="waitMeeting in waitMeetings" ng-click="show(waitMeeting)"
                      style="margin-bottom: 10px;border:0px;">
                <a class="button icon-right ion-ios-arrow-right button-clear button-light"
                   style="position:absolute; top: 35%; right: 2%;"></a>

                <div class="textLimited"><img src="img/icon/subject.png" style="margin-right: 2%;width: 4%;height: 4%">{{waitMeeting.subject}}
                </div>
                <hr class="hr">
                <br/>

                <p style="line-height: 35px">会议类型：<span ed-options="meetingType">{{waitMeeting.meetingType}}</span></p>

                <p>会议时间：{{waitMeeting.startTime+'-'+waitMeeting.endTime.substring(11)}}</p>

            </ion-item>
        </ion-list>
    </div>

    <!--<div ng-if="isActive == 'alreadyJoin'">-->
    <!--<ion-refresher pulling-text="<span class='pulling-text-auto'>{{pulltextchange}}</span>" on-refresh="doRefresh()"-->
    <!--on-pulling="pulltext()" spinner="ripple" pulling-icon="ion-ios-refresh-empty"></ion-refresher>-->

    <!--<ion-list ng-show="!edit">-->
    <!--<ion-item ng-repeat="alreadyMeeting in alreadyMeetings" ng-click="show(alreadyMeeting)"-->
    <!--style="margin-bottom: 10px;border:0px;">-->
    <!--<a class="button icon-right ion-ios-arrow-right button-clear button-light"-->
    <!--style="position:absolute; top: 35%; right: 2%;"></a>-->

    <!--<div class="textLimited"><img src="img/icon/subject.png" style="margin-right: 2%;width: 4%;height: 4%">{{alreadyMeeting.subject}}-->
    <!--</div>-->
    <!--<hr class="hr">-->
    <!--<br/>-->

    <!--<p style="line-height: 35px">会议类型：<span ed-options="meetingType">{{alreadyMeeting.meetingType}}</span>-->
    <!--</p>-->

    <!--<p>会议时间：{{alreadyMeeting.startTime+'-'+alreadyMeeting.endTime.substring(11)}}</p>-->

    <!--</ion-item>-->
    <!--</ion-list>-->
    <!--</div>-->


    <ion-list ng-show="edit">

        <div class="detailTitle" ng-repeat="field in meetingFields| filter : {showType : '6'}">
            <img style="width: 4%;height: 4%;position: relative;"
                 src="img/icon/subject.png"/>
            {{field.value}}
        </div>

        <div class="detailContent" ng-repeat="field in meetingFields " ng-show="field.showType!=0&&field.showType!=6">
            <span style="display: inline-block;width: 100px">{{field.title}}:</span>

            <!--<span style="color: #666;overflow: hidden;" ng-if="field.showType==7" ed-options="{{field.col}}">{{field.value}}</span>
            <span style="color: #666;overflow: hidden;" ng-if="field.showType!=7&&field.col!='files'">{{field.value}}</span>-->

            <span style="color: #666;overflow: hidden;" ng-if="field.options" ed-options="{{field.options}}">{{field.value}}</span>
            <span style="color: #666;overflow: hidden;"
                  ng-if="(!field.options)&&field.col!='files'">{{field.value}}</span>

            <div ng-repeat="file in meetingFields.files" ng-if="field.col=='files'">
                <span><a href="#" ng-click="mClick(file.url)">{{file.name}}</a></span>
            </div>

            <!--<span style="color: #666;overflow: hidden;" ng-show="{{field.showType==4}}">
              <a href="#">{{field.value}}</a>
            </span>-->

        </div>

        <div class="detailTitle">流程状态：{{taskName}}</div>

    </ion-list>

</ion-content>
<ionic-footer class="bar bar-footer" ng-show="edit  && isActive == 'waitJoin'">
    <div ng-show="!respMeet">
        <div class="col-50">
            <button class="button button-light" style="margin-left: 45%" ng-click="agreeJoin()">同意参会
            </button>

        </div>
        <div class="col-50">
            <button class="button button-light" style="margin-left: 45%" ng-click="refuseJoin()">拒绝参会
            </button>
        </div>
    </div>
    <div ng-show="respMeet">
        <span>  {{feedback.feedback}}  </span><span ng-show = "!{{feedback.feedback.indexOf('同意') !=-1 }}"> 原因：{{feedback.reason}}</span>
    </div>
</ionic-footer>


<ionic-footer class="bar bar-footer" ng-show="edit && isActive == 'myMeet'">
    <button class="button button-light" style="margin-left: 45%" ng-click="feedMeet()">会议反馈
    </button>
</ionic-footer>

<script id="my-modal.html" type="text/ng-template">
    <ion-modal-view>
        <ion-header-bar>
            <h1 class="title">查看会议反馈</h1>

            <div class="buttons">
                <button class="button button-clear" ng-click="modal.hide()">关闭</button>
            </div>
        </ion-header-bar>
        <ion-content>
            <ion-list>
                <ion-item ng-repeat="meetStaff in meetStaffs"
                          style="margin-bottom: 8px;border:0px;">
                    <p style="line-height: 25px">职工姓名：{{meetStaff.userName}}</p>

                    <p style="line-height: 25px">反馈意见：{{meetStaff.feedback}}</p>

                    <p style="line-height: 25px">原因：{{meetStaff.reason}}</p>
                    <hr class="hr">
                </ion-item>
            </ion-list>
        </ion-content>
    </ion-modal-view>
</script>